package com.tiantianfresh.view.controller;

import com.tiantianfresh.model.pojo.AJAXResult;
import com.tiantianfresh.model.pojo.Address;
import com.tiantianfresh.model.pojo.CommodityResult;
import com.tiantianfresh.view.service.AddAddressService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @author FANGAO
 * @date 2021/12/7 - 下午 15:04
 */
@Controller
@RequestMapping("/address")
public class AddAddressController {
    @Autowired
    private AddAddressService addAddressService;
    @ResponseBody
    @RequestMapping("/addAddress")
    public Object addAddress(Address address){
        AJAXResult result = new AJAXResult();
        result.setSuccess(addAddressService.addAddress(address));
        return result;
    }
}
